

<form id="import-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="alert alert-info-light" style="margin-bottom:10px;">
        <b>温馨提示</b><br>
        导入的图片名称格式为：学生姓名-学号
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('班级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="school,grade,classes,parents">
                <select class="form-control school" name="school_id" data-url="school/cxSelect"></select>
                <select class="form-control grade" name="grade_id" data-url="grade/cxSelect" data-query-name="school_id"></select>
                <select class="form-control classes" name="class_id" data-url="classes/cxSelect" data-query-name="grade_id" data-rule="required"></select>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择图片')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div id="container">
                <style>
                    #container {
                        border: 1px solid #dadada;
                        color: #838383;
                        font-size: 12px;
                        margin-top: 10px;
                        background-color: #FFF;
                        //width: 986px;
                        min-height: 236px;
                        display: none;
                    }

                    #uploader .queueList {
                        margin: 20px;
                    }

                    .element-invisible {
                        position: absolute !important;
                        clip: rect(1px 1px 1px 1px);
                        /* IE6, IE7 */
                        clip: rect(1px, 1px, 1px, 1px);
                    }

                    #uploader .placeholder {
                        min-height: 238px;
                        padding-top: 158px;
                        text-align: center;
                        background: url(/assets/img/image.png) center 93px no-repeat;
                        color: #cccccc;
                        font-size: 18px;
                        position: relative;
                    }

                    #uploader .placeholder .webuploader-pick {
                        font-size: 14px;
                        background: #00b7ee;
                        border-radius: 3px;
                        line-height: 44px;
                        padding: 0 30px;
                        color: #fff;
                        display: inline-block;
                        margin: 20px auto;
                        cursor: pointer;
                        width:auto;
                        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
                    }

                    #uploader .placeholder .webuploader-pick-hover {
                        background: #00a2d4;
                    }

                    #uploader .placeholder .flashTip {
                        color: #666666;
                        font-size: 12px;
                        position: absolute;
                        width: 100%;
                        text-align: center;
                        bottom: 20px;
                    }

                    #uploader .placeholder .flashTip a {
                        color: #0785d1;
                        text-decoration: none;
                    }

                    #uploader .placeholder .flashTip a:hover {
                        text-decoration: underline;
                    }

                    #uploader .placeholder.webuploader-dnd-over {
                        border-color: #999999;
                    }

                    #uploader .placeholder.webuploader-dnd-over.webuploader-dnd-denied {
                        border-color: red;
                    }

                    #uploader .filelist {
                        list-style: none;
                        margin: 0;
                        padding: 0;
                    }

                    #uploader .filelist:after {
                        content: '';
                        display: block;
                        width: 0;
                        height: 0;
                        overflow: hidden;
                        clear: both;
                    }

                    #uploader .filelist li {
                        width: 110px;
                        height: 110px;
                        background: url(/assets/img/image.png) no-repeat;
                        text-align: center;
                        margin: 0 8px 20px 0;
                        position: relative;
                        display: inline;
                        float: left;
                        overflow: hidden;
                        font-size: 12px;
                    }

                    #uploader .filelist li p.log {
                        position: relative;
                        top: -45px;
                    }

                    #uploader .filelist li p.title {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        top: 5px;
                        text-indent: 5px;
                        text-align: left;
                    }

                    #uploader .filelist li p.progress {
                        position: absolute;
                        width: 100%;
                        bottom: 0;
                        left: 0;
                        height: 8px;
                        overflow: hidden;
                        z-index: 50;
                        background: none;
                    }

                    #uploader .filelist li p.progress span {
                        display: none;
                        overflow: hidden;
                        width: 0;
                        height: 100%;
                        background: #1483d8 url(/assets/img/progress.png) repeat-x;
                        -webit-transition: width 200ms linear;
                        -moz-transition: width 200ms linear;
                        -o-transition: width 200ms linear;
                        -ms-transition: width 200ms linear;
                        transition: width 200ms linear;
                        -webkit-animation: progressmove 2s linear infinite;
                        -moz-animation: progressmove 2s linear infinite;
                        -o-animation: progressmove 2s linear infinite;
                        -ms-animation: progressmove 2s linear infinite;
                        animation: progressmove 2s linear infinite;
                        -webkit-transform: translateZ(0);
                    }

                    @-webkit-keyframes progressmove {
                        0% {
                            background-position: 0 0;
                        }
                        100% {
                            background-position: 17px 0;
                        }
                    }

                    @-moz-keyframes progressmove {
                        0% {
                            background-position: 0 0;
                        }
                        100% {
                            background-position: 17px 0;
                        }
                    }

                    @keyframes progressmove {
                        0% {
                            background-position: 0 0;
                        }
                        100% {
                            background-position: 17px 0;
                        }
                    }

                    #uploader .filelist li p.imgWrap {
                        position: relative;
                        z-index: 2;
                        line-height: 110px;
                        vertical-align: middle;
                        overflow: hidden;
                        width: 110px;
                        height: 110px;
                        -webkit-transform-origin: 50% 50%;
                        -moz-transform-origin: 50% 50%;
                        -o-transform-origin: 50% 50%;
                        -ms-transform-origin: 50% 50%;
                        transform-origin: 50% 50%;
                        -webit-transition: 200ms ease-out;
                        -moz-transition: 200ms ease-out;
                        -o-transition: 200ms ease-out;
                        -ms-transition: 200ms ease-out;
                        transition: 200ms ease-out;
                    }

                    #uploader .filelist li img {
                        width: 100%;
                    }

                    #uploader .filelist li p.error {
                        background: #f43838;
                        color: #fff;
                        position: absolute;
                        bottom: 0;
                        left: 0;
                        height: 28px;
                        line-height: 28px;
                        width: 100%;
                        z-index: 100;
                    }

                    #uploader .filelist li .success {
                        display: block;
                        position: absolute;
                        left: 0;
                        bottom: 0;
                        height: 40px;
                        width: 100%;
                        z-index: 200;
                        background: url(/assets/img/success.png) no-repeat right bottom;
                    }

                    #uploader .filelist div.file-panel {
                        position: absolute;
                        height: 0;
                        filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000')\0;
                        background: rgba( 0, 0, 0, 0.5);
                        width: 100%;
                        top: 0;
                        left: 0;
                        overflow: hidden;
                        z-index: 300;
                    }

                    #uploader .filelist div.file-panel span {
                        width: 24px;
                        height: 24px;
                        display: inline;
                        float: right;
                        text-indent: -9999px;
                        overflow: hidden;
                        background: url(/assets/img/icons.png) no-repeat;
                        margin: 5px 1px 1px;
                        cursor: pointer;
                    }

                    #uploader .filelist div.file-panel span.rotateLeft {
                        background-position: 0 -24px;
                    }

                    #uploader .filelist div.file-panel span.rotateLeft:hover {
                        background-position: 0 0;
                    }

                    #uploader .filelist div.file-panel span.rotateRight {
                        background-position: -24px -24px;
                    }

                    #uploader .filelist div.file-panel span.rotateRight:hover {
                        background-position: -24px 0;
                    }

                    #uploader .filelist div.file-panel span.cancel {
                        background-position: -48px -24px;
                    }

                    #uploader .filelist div.file-panel span.cancel:hover {
                        background-position: -48px 0;
                    }

                    #uploader .statusBar {
                        height: 63px;
                        border-top: 1px solid #dadada;
                        padding: 0 20px;
                        line-height: 63px;
                        vertical-align: middle;
                        position: relative;
                    }

                    #uploader .statusBar .progress {
                        border: 1px solid #1483d8;
                        width: 198px;
                        background: #fff;
                        height: 20px;
                        position: relative;
                        display: inline-block;
                        text-align: center;
                        line-height: 20px;
                        color: #000000;
                        position: relative;
                        vertical-align: middle;
                        margin: 0 10px 4px 0;
                    }

                    #uploader .statusBar .progress span.percentage {
                        width: 0;
                        height: 100%;
                        left: 0;
                        top: 0;
                        background: #1483d8;
                        position: absolute;
                    }

                    #uploader .statusBar .progress span.text {
                        position: relative;
                        z-index: 10;
                    }

                    #uploader .statusBar .info {
                        display: inline-block;
                        font-size: 14px;
                        color: #666666;
                    }

                    #uploader .statusBar .btns {
                        position: absolute;
                        top: 10px;
                        right: 20px;
                        line-height: 40px;
                    }

                    #filePicker2 {
                        display: inline-block;
                        float: left;
                    }

                    #uploader .statusBar .btns .webuploader-pick,
                    #uploader .statusBar .btns .uploadBtn,
                    #uploader .statusBar .btns .uploadBtn.state-uploading,
                    #uploader .statusBar .btns .uploadBtn.state-paused {
                        background: #ffffff;
                        border: 1px solid #cfcfcf;
                        color: #565656;
                        padding: 0 10px;
                        display: inline-block;
                        border-radius: 3px;
                        margin-left: 10px;
                        cursor: pointer;
                        font-size: 14px;
                        float: left;
                    }

                    #uploader .statusBar .btns .webuploader-pick-hover,
                    #uploader .statusBar .btns .uploadBtn:hover,
                    #uploader .statusBar .btns .uploadBtn.state-uploading:hover,
                    #uploader .statusBar .btns .uploadBtn.state-paused:hover {
                        background: #f0f0f0;
                    }

                    #uploader .statusBar .btns .uploadBtn {
                        background: #00b7ee;
                        color: #fff;
                        border-color: transparent;
                    }

                    #uploader .statusBar .btns .uploadBtn:hover {
                        background: #00a2d4;
                    }

                    #uploader .statusBar .btns .uploadBtn.disabled {
                        pointer-events: none;
                        opacity: 0.6;
                    }

                    .webuploader-pick {
                        height: 40px !important;
                        line-height: 40px !important;
                    }

                    #uploader .finshed-basic{width:100%;height:64px;}
                    #uploader .finshed{height: 64px;line-height: 64px;background-color: #fff;padding-top:0;}
                    #uploader .finshed.fixed .finshed-1200{width:1200px;height:64px;margin:0 auto;}
                    #uploader .finshed.fixed .finshed-950{width:950px;border-right:1px solid #dadada;border-left:1px solid #dadada;height:64px;float: right;margin-right:14px;}

                    #result li {list-style: none; line-height: 18px; border-bottom: 1px solid #dadada}
                </style>
                <link href="/assets/css/webuploader.css" rel="stylesheet">

                <div id="uploader">
                </div>
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('匹配结果')}:</label>
        <div class="col-xs-12 col-sm-8">
            <ul id="result"></ul>
        </div>
    </div>

    <!--<div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>-->
</form>

<script id="tpl" type="text/html">
    <div class="queueList">
        <div id="dndArea" class="placeholder">
            <div id="filePicker" class="webuploader-container">
                <div class="webuploader-pick">点击选择图片</div>
                <div id="rt_rt_1b20iklu81mp75ij1qem1q9v1nsb1" style="position: absolute; top: 20px; left: 836px; width: 168px; height: 44px; overflow: hidden; bottom: auto; right: auto;">
                    <input type="file" capture="camera" name="file" class="webuploader-element-invisible" multiple="multiple">
                    <label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label>
                </div>
            </div>
            <p class="f14">或将照片拖到这里，单次最多可选300张</p>
        </div>
        <ul class="filelist"></ul>
    </div>

    <div class="finshed-basic">
        <div class="finshed">
            <div class="finshed-1200">
                <div class="finshed-950">
                    <div class="statusBar" style="display:none;">
                        <div class="progress" style="display: none;">
                            <span class="text">0%</span>
                            <span class="percentage" style="width: 0%;"></span>
                        </div>
                        <div class="info">共0张（0B），已上传0张</div>
                        <div class="btns">
                            <div id="filePicker2" class="webuploader-container">
                                <div class="webuploader-pick">继续添加</div>
                                <div id="rt_rt_1b20ikluc1sh41u3u1361ffa1cfq6" style="position: absolute; top: 0px; left: 0px; width: 38px; height: 2px; overflow: hidden; bottom: auto; right: auto;">
                                    <input type="file" capture="camera" name="file" class="webuploader-element-invisible" multiple="multiple">
                                    <label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label>
                                </div>
                            </div>
                            <div class="uploadBtn state-pedding">开始上传</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>

<script id="resultTpl" type="text/html">
    <li><%=data%></li>
</script>

